using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using ConsolidationTool.WebParts.ControlTemplates;
using Microsoft.SharePoint;

namespace ConsolidationTool.WebParts.Actual_Input.AIA.AIAEditForm
{
    public partial class AIAEditFormUserControl : FSUserControlBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            (commonButtomAction as CommonButtomAction).SaveButtonClicked += new CommonButtomAction.SaveButtonClickHandler(ESNewFormUserControl_SaveButtonClicked);
            TopSelector = commonEntitySelector as CommonEntitySelector; ButtomAction = commonButtomAction as CommonButtomAction;
            ControlMode = Title.ControlMode;
        }

        protected override void OnPreRender(EventArgs e)
        {
            if (!IsPostBack)
                base.FormInitialization();
            base.OnPreRender(e);
        }

        public override SPListItem Item
        {
            get
            {
                return ConsolidationTool_CoName.ListItem; 
            } 
        }

        void ESNewFormUserControl_SaveButtonClicked(object sender, EventArgs e)
        { 
            base.Save();
        }
    }
}
